package cn.iocoder.yudao.module.system.dal.mysql.customerservice;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.customerservice.CustomerServiceDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.customerservice.vo.*;

/**
 * 客户服务 Mapper
 *
 * @author lizhongwen
 */
@Mapper
public interface CustomerServiceMapper extends BaseMapperX<CustomerServiceDO> {

    default PageResult<CustomerServiceDO> selectPage(CustomerServicePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CustomerServiceDO>()
                .eqIfPresent(CustomerServiceDO::getNo, reqVO.getNo())
                .likeIfPresent(CustomerServiceDO::getName, reqVO.getName())
                .orderByDesc(CustomerServiceDO::getId));
    }

}